package com.steven.string;

import org.omg.CosNaming.NamingContextExtPackage.StringNameHelper;

/**
 * Created with IntelliJ IDEA.
 * User: think
 * Date: 12-7-18
 * Time: 上午9:27
 * To change this template use File | Settings | File Templates.
 */
public class ConvertCapitalize {


    public  String capitalize(final  String str    ){

        if(null==str  )     {
            return  null   ;

        }
        char [] chars = str.toCharArray();

        if(chars.length>0){

            chars[0] =Character.toUpperCase(chars[0]);


        }

        return  new String(chars);
    }

    public  static  void  main(String [] args){

        String  name =  new ConvertCapitalize().capitalize("yangdongping");
        System.out.println(name);
    }
}
